package com.migration.model.olddb;

import jakarta.persistence.*;
import lombok.Data;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * 文档表 实体类
 * 表名：ra_document
 * 自动生成的实体类
 */
@Data
@Entity
@Table(name = "ra_document")
public class RaDocument implements Serializable {

    private static final long serialVersionUID = 1L;
    
    /**
     * 
     * 主键
     */
    @Id
    @Column(name = "id", nullable = false)
    private Long id;
    
    /**
     * 文件名称
     */
    @Column(name = "name", nullable = false, length = 255)
    private String name;
    
    /**
     * 文件路径
     */
    @Column(name = "url", nullable = false, length = 255)
    private String url;
    
    /**
     * 文件类型
     */
    @Column(name = "type", nullable = false)
    private Integer type;
    
    /**
     * 状态（1正常2即将到期3已过期）
     * 默认值: 1
     */
    @Column(name = "status", nullable = false)
    private Integer status;
    
    /**
     * 备注
     */
    @Column(name = "remark", length = 255)
    private String remark;
    
    /**
     * 到期提醒类型（1提前一个月2提前3个月3提前6个月）
     */
    @Column(name = "expire_remind_type")
    private Integer expireRemindType;
    
    /**
     * 到期日期
     */
    @Column(name = "expire_date", nullable = false)
    private java.time.LocalDate expireDate;
    
    /**
     * 是否删除（0否1是）
     * 默认值: 0
     */
    @Column(name = "is_del")
    private Integer isDel;
    
    /**
     * 创建者
     */
    @Column(name = "create_by", length = 255)
    private String createBy;
    
    /**
     * 创建时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "create_time")
    private java.time.LocalDateTime createTime;
    
    /**
     * 更新者
     */
    @Column(name = "update_by", length = 255)
    private String updateBy;
    
    /**
     * 更新时间
     * 默认值: CURRENT_TIMESTAMP
     */
    @Column(name = "update_time")
    private java.time.LocalDateTime updateTime;
    
    /**
     * 租户id
     * 默认值: 1
     */
    @Column(name = "tenant_id", nullable = false)
    private Integer tenantId;
    
    @Override
    public String toString() {
        return "RaDocument{" +
            "id=" + id +
            ", name=" + name +
            ", url=" + url +
            ", type=" + type +
            ", status=" + status +
            ", remark=" + remark +
            ", expireRemindType=" + expireRemindType +
            ", expireDate=" + expireDate +
            ", isDel=" + isDel +
            ", createBy=" + createBy +
            ", createTime=" + createTime +
            ", updateBy=" + updateBy +
            ", updateTime=" + updateTime +
            ", tenantId=" + tenantId +
        '}';
    }
} 